package com.wdzl.util;

import java.awt.Font;

import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PiePlot;

public class JFreechartUtil {
	//设置字体处理中文乱码
	public static void setChartFont(JFreeChart chart){
		Font font = new Font("黑体",Font.BOLD,16);
		chart.getTitle().setFont(font);
		chart.getLegend().setItemFont(font);

		PiePlot plot  = (PiePlot) chart.getPlot();
		plot.setLabelFont(font);
	}
}
